package homework.homework04;

public class Student {
    private String name;//姓名
    private int age;//年龄
    private String content;//学习内容

    //有参构造
    public Student(String name, int age, String content) {
        this.name = name;
        this.age = age;
        this.content = content;
    }

    //无参构造
    public Student() {
    }

    //get and set
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public void eat() {
        System.out.println("年龄为" + age + "的" + name + "同学正在吃饭");
    }
    public void study() {
        System.out.println("年龄为" + age + "的" + name + "同学正在专心致志的听着"+content);
    }
}
